Skip to content

Conversation

@elenatanasoiu
Copy link
Contributor

Depends on github/vscode-codeql#2027 getting merged first.

At the moment we're asking the user to manually right click on
the database folder ('codeql-tutorial-database') and set it as
the current database.

We can take this one step further by defining a command that gets
triggered when we arrive at the step for setting up the database.

The command ("codeQL.setDefaultTourDatabase") will build the URI
pointing to our preloaded database and set it as the current one.

We initially considered whether we can re-use the setCurrentDatabase
command and pass the URI of the database from the codespace itself,
but the URI would be hardcoded as:

file://0-62/workspaces/codespaces-codeql/codeql-tutorial-database

as we can only pass the codeTour extension a command and string
parameters.

This would have been brittle as the filepath for a codespace might
change in the future.

Instead we can define a custom tour command ("setDefaultTourDatabase")
to look at the current workspace folder and build the path to the
database in the CodeQL extension.

Co-authored-by: Shati Patel <shati-patel@github.com>
Copy link
Contributor

@shati-patel shati-patel left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Small wording suggestion, otherwise LGTM ✏️

@elenatanasoiu
Copy link
Contributor Author

elenatanasoiu commented Feb 2, 2023

Going to wait on merging this until the next extension release so that we have the command available.

Co-authored-by: Andrew Eisenberg <aeisenberg@github.com>
@elenatanasoiu elenatanasoiu merged commit 17ebf86 into main Feb 3, 2023
@elenatanasoiu elenatanasoiu deleted the elena/set-current-database branch February 3, 2023 15:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants